Skip to content

Conversation

@vadorovsky
Copy link
Contributor

@vadorovsky vadorovsky commented Oct 13, 2025

We currently raise a warning in print_btf.py when any of these types have a name. Linux kernel doesn't allow names in these types either.[0]

However, there is nothing stopping frontends from giving names to these types. To make sure that they are always anonymous, explicitly skip the name emission.

[0] https://elixir.bootlin.com/linux/v6.17.1/source/kernel/bpf/btf.c#L2586

@vadorovsky vadorovsky force-pushed the btf-ptr-name branch 3 times, most recently from a06db8c to bdcfba5 Compare October 16, 2025 17:27
@vadorovsky
Copy link
Contributor Author

@eddyz87 @tamird

Copy link
Contributor

@eddyz87 eddyz87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes in BTF generated for kernel selftests, the change lgtm.

@vadorovsky vadorovsky force-pushed the btf-ptr-name branch 2 times, most recently from 08b5044 to 5454bb8 Compare October 20, 2025 20:00
We currently raise a warning in `print_btf.py` when any of these types
have a name. Linux kernel doesn't allow names in these types either.[0]

However, there is nothing stopping frontends from giving names to these
types. To make sure that they are always anonymous, explicitly skip the
name emission.

[0] https://elixir.bootlin.com/linux/v6.17.1/source/kernel/bpf/btf.c#L2586
@vadorovsky
Copy link
Contributor Author

@eddyz87 @yonghong-song Can we get it merged? 🙂

@yonghong-song yonghong-song merged commit 7ae7a5a into llvm:main Oct 22, 2025
10 checks passed
@vadorovsky vadorovsky deleted the btf-ptr-name branch October 22, 2025 14:36
vadorovsky added a commit to aya-rs/llvm-project that referenced this pull request Oct 24, 2025
…es (llvm#163174)

We currently raise a warning in `print_btf.py` when any of these types
have a name. Linux kernel doesn't allow names in these types either.[0]

However, there is nothing stopping frontends from giving names to these
types. To make sure that they are always anonymous, explicitly skip the
name emission.

[0]
https://elixir.bootlin.com/linux/v6.17.1/source/kernel/bpf/btf.c#L2586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants